<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script src="vue.js" type="text/javascript" charset="utf-8"></script>
	</head>
	<body>
		<div id="app">
			{{a}}{{b}}
			// v-bind attribute：指令，前缀v-，VUE提供的特殊attribute，将元素节点的title属性和VUE实现的message保持一致
			<span v-bind:title="message">
				鼠标悬停查看绑定信息！
			</span>
		</div>

		<script>
			var data = {
				a : "message",
				b : 2,
				message : "页面加载于" + new Date().toLocaleTimeString()
			}
			var vm = new Vue({
				el:"#app",
				data:data
			});
			vm.$watch("b",function(newVal, oldValue){
				console.log(oldValue+"------"+newVal)
			});
			vm.$data.b  = 13;
		</script>
	</body>
</html>
